
package J11_9;

import java.util.Arrays;
import java.util.Scanner;

public class Test3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int m = in.nextInt();
        int k = in.nextInt();
        int[] h = new int[n];
        int[] b = new int[m];
        for (int i = 0; i < n; i++) {
            h[i] = in.nextInt();
        }
        for (int i = 0; i < m; i++) {
            b[i] = in.nextInt();
        }
        Arrays.sort(h);
        Arrays.sort(b);
        int tmp = 0;
        for (int i = 0, j = 0; i < n && j < m;) {
            if (h[i] <= b[j]) {
                tmp++;
                i++;
                j++;
            } else {
                j++;
            }
            if (tmp == k) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}
